import { domainService } from '~/config/server'
import { NetService } from '~/utils/net.service'
import { Inject, Debounce } from "~/core/decorator";
import { FilterService } from '~/utils/filter.service';

export class OutsourceCommissionedService {
  @Inject(NetService)
  private netService: NetService
  /**
   * 委外管理-委外方管理-委外方列表
   */
  public searchCutsourceList(data,page,sort?) {
    return this.netService.send({
      server: domainService.outsourceCommissionedManageController.searchCutsourceList,
      data : {
        outsName:data.outsName,
        outSourceType:data.outSourceType,
        // areaId:data.areaId.length===0?'':data.areaId[data.areaId.length-1],
        provinceId: data.areaId[0],
        cityId: data.areaId[1],
        countyId: data.areaId[2],
        deptId:data.deptId,
        deptName:data.deptName,
        provinceCode:data.provinceCode,
        outsourceStatus:data.outsourceStatus,
      },
      page,
      sort,
    })
  }

  /**
   * 修改委外方
   *
   */
  public modifyCutsource(data) {
    return this.netService.send({
      server: domainService.outsourceCommissionedManageController.modifyCutsource,
      data
    })
  }

}
